package com.mengxuegu.service;

import com.mengxuegu.springcloud.entities.Product;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author william
 * @create 2021-06-22 13:33
 **/
@Component//一定要加上它,将此类纳入到容器中
public class ProductClientServiceFallBack implements ProductClientService{


    @Override
    public boolean add(Product product) {
        return false;
    }

    @Override
    public Product get(Long id) {
        return new Product(id,"id="+id+"无数据---@feignClient&hydtrix","无数据");
    }

    @Override
    public List<Product> list() {
        return null;
    }
}
